package com.deimos.dataBase;

import java.util.HashSet;
import java.util.Set;

/**
 * @author Ramón Fernández Buján
 */

public class Task extends java.lang.Object {
	/*public static final String ACCEPTED = "ACCEPTED";
	public static final String CANCELLED = "CANCELLED";
	public static final String COMPLETED = "COMPLETED";
	public static final String EXPIRED = "EXPIRED";
	public static final String FAILED = "FAILED";
	public static final String IN_PROGRESS = "eo:TASK_IN_PROGRESS";
	public static final String PENDING = "PENDING";
	public static final String REJECTED = "REJECTED";
	public static final String RESERVED = "RESERVED";
	public static final String FEASIBLE = "FEASIBLE";
	public static final String NOT_FEASIBLE = "NOT FEASIBLE";
	*/
    
    private java.lang.String sensorId;
    private java.lang.String taskId;
    private java.lang.Double delay;
    
    private java.lang.String serviceType;
    private java.lang.String serviceURL;
    private java.lang.String title;
    private Set<Event> events;
    private Set<Segment> segments;
    
    // constructor
    public Task() {
    }
    
    

    /**
     * @return the segments
     */
    public Set<Segment> getSegments() {
        return segments;
    }



    /**
     * @param segments the segments to set
     */
    public void setSegments(Set<Segment> segments) {
        this.segments = segments;
    }

    public void addSegment(Segment segment) {
	if (segments == null)
	    segments = new HashSet<Segment>();
	this.segments.add(segment);
    }

    public Set<Event> getEvents() {
	return events;
    }

    public void setEvents(Set<Event> events) {
	this.events = events;
    }

    public void addEvent(Event event) {
	if (events == null)
	    events = new HashSet<Event>();
	this.events.add(event);
    }

    public java.lang.String getSensorId() {
	return sensorId;
    }

    public void setSensorId(java.lang.String sensorId) {
	this.sensorId = sensorId;
    }

    public java.lang.String getTaskId() {
	return taskId;
    }

    public void setTaskId(java.lang.String taskId) {
	this.taskId = taskId;
    }

    public java.lang.Double getDelay() {
	return delay;
    }

    public void setDelay(java.lang.Double delay) {
	this.delay = delay;
    }



    public java.lang.String getServiceType() {
	return serviceType;
    }

    public void setServiceType(java.lang.String serviceType) {
	this.serviceType = serviceType;
    }

    public java.lang.String getServiceURL() {
	return serviceURL;
    }

    public void setServiceURL(java.lang.String serviceURL) {
	this.serviceURL = serviceURL;
    }

    public java.lang.String getTitle() {
	return title;
    }

    public void setTitle(java.lang.String title) {
	this.title = title;
    }

    // GET/SET METHODS
}
